use validator::ValidationError;

pub fn validate_number_not_zero(number: u64) -> Result<(), ValidationError> {
    if number == 0 {
        return Err(ValidationError::new("非法的数据"));
    }
    Ok(())
}

pub fn validate_string_empty(string: &str) -> Result<(), ValidationError> {
    if string.is_empty() {
        return Err(ValidationError::new("空字符串"));
    }
    Ok(())
}